package kr.saeildamil.androidstudy.ch07;


import kr.saeildamil.androidstudy.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;

public class Ch07Main extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ch07_main);
	}

	public void mOnClick(View v) {
		switch (v.getId()) {
		case R.id.main_custom_btn:
			startActivity(new Intent(this, CustomViewEx.class));
			break;
		case R.id.main_prepaint_btn:
			startActivity(new Intent(this, PrePaintEx.class));
			break;
		case R.id.main_paintstyle_btn:
			startActivity(new Intent(this, PaintStyleEx.class));
			break;
		case R.id.main_drawbitmap_btn:
			startActivity(new Intent(this, DrawBitmapEx.class));
			break;
		case R.id.main_offscreen_btn:
			startActivity(new Intent(this, DrawBitmap2Ex.class));
			break;
		case R.id.main_toastlayout_btn:
			startActivity(new Intent(this, ToastLayoutEx.class));
			break;
		case R.id.main_vibrate_btn:
			startActivity(new Intent(this, Vibrate.class));
			break;
		}
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}
